<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./lib/bootstrap-3.4.1-dist/css/bootstrap.min.css">
    <title>Document</title>

</head>

<body>
    <div id="app">

        <table class="table table-bordered table-hover table-striped">
            <thead>
                <th>索引</th>
                <th>id</th>
                <th>内容</th>
            </thead>
            <tbody>
                <!-- key是官方推荐的，为了以后的.vue里的一个坑 -->
                <tr v-for="(list,index) in lists" :key="list.id" :title="list.name">
                    <td>{{index + 1}}</td>
                    <td>{{list.id}}</td>
                    <td>{{list.name}}</td>
                </tr>
            </tbody>
        </table>

    </div>
    <script src="./lib/vue.js"></script>
    <script>
        const vm = new Vue({
            el: '#app',
            data: {
                lists: [{
                    id: 1,
                    name: 'name1'
                }, {
                    id: 2,
                    name: 'name2'
                }]
            },
            methods: {}
        })
    </script>
</body>

</html>